package com.leruan.aasimp.service.impl;

import java.util.List;

import com.leruan.aasimp.dao.CarInsuranceComDao;
import com.leruan.aasimp.dao.CarMainInfoDao;
import com.leruan.aasimp.dao.EauserDao;
import com.leruan.aasimp.entity.CarInsuranceCom;
import com.leruan.aasimp.entity.CarMainInfo;
import com.leruan.aasimp.entity.Eauser;
import com.leruan.aasimp.service.EauserService;

public class EauserServiceImpl implements EauserService{
	
	private EauserDao eauserDao;
	private CarMainInfoDao carMainInfoDao;
	private CarInsuranceComDao carInsuranceComDao;
	
	
	public CarInsuranceComDao getCarInsuranceComDao() {
		return carInsuranceComDao;
	}

	public void setCarInsuranceComDao(CarInsuranceComDao carInsuranceComDao) {
		this.carInsuranceComDao = carInsuranceComDao;
	}

	public CarMainInfoDao getCarMainInfoDao() {
		return carMainInfoDao;
	}

	public void setCarMainInfoDao(CarMainInfoDao carMainInfoDao) {
		this.carMainInfoDao = carMainInfoDao;
	}

	public void addEauser(Eauser eauser) {
		eauserDao.addEauser(eauser);		
	}
	
	public Eauser getEauserByUn(String username) {
		return eauserDao.getEauserByUn(username);
	}


	public EauserDao getEauserDao() {
		return eauserDao;
	}


	public void setEauserDao(EauserDao eauserDao) {
		this.eauserDao = eauserDao;
	}

	public void updateEauser(Eauser eauser) {
		eauserDao.updateEauser(eauser);
	}

	public Eauser getEauserByUid(String userid) {
		return eauserDao.getEauserByUid(userid);
	}

	public List<Eauser> getEausersByType(int value) {
		return eauserDao.getEausersByType(value);
	}

	public List<CarMainInfo> getCarManagesByUc(String usercard) {
		return carMainInfoDao.getCarsInfoByIdd(usercard);
	}

	public CarMainInfo getCarManagesByVin(String vin) {
		return carMainInfoDao.getCarsInfoByVin(vin);
	}

	public void updatecarManage(CarMainInfo carMainInfo) {
		carMainInfoDao.update(carMainInfo);
	}

	public void saveCom(CarInsuranceCom com) {
		carInsuranceComDao.save(com);
	}

	public CarInsuranceCom getComById(Long idCompany) {
		return carInsuranceComDao.getComById(idCompany);
	}

	public void updateCom(CarInsuranceCom com) {
		carInsuranceComDao.update(com);
	}

	public void destroyEauser(String userid) {
		eauserDao.destroyEauser(userid);
	}

	public List<Eauser> getEausersByTypeAndId(int i, Long idCompany) {
		return eauserDao.getEausersByTypeAndId(i,idCompany);
	}


}
